# -*- coding: utf-8 -*-
"""
@Time ： 2023/3/8 9:58
@Author ： ChuiZi
@File ：createPort.py
@IDE ：PyCharm
"""
import json

from options.configs import FrameDataPath
from lib.common.portMock import Port


def run():
    with open(FrameDataPath.pathMockPortdata, "r", encoding="utf-8") as jf1:
        mock_port_datas = json.loads(jf1.read())
    Port(mock_port_datas).runMcok()


if __name__ == '__main__':
    import threading
    import time

    web_thread = threading.Thread(name="web port mock", target=run)
    web_thread.daemon = True  # 开启守护进程
    web_thread.start()
    time.sleep(5)
    print("主进程结束")
